<!doctype html>



  


<html class="theme-next muse use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.1" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="LVS," />








  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.1" />






<meta name="description" content="一、ARP技术概念介绍&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;为什么讲ARP技术，因为平常工作中有接触。还有就是LVS的dr模式是用到arp的技术和数据。 1、什么是ARP协议&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;ARP协议全程地址解析协议（AddressResolution Prot">
<meta name="keywords" content="LVS">
<meta property="og:type" content="article">
<meta property="og:title" content="LVS原理详解及部署之一：ARP原理准备">
<meta property="og:url" content="https://hcldirgit.github.io/2017/09/03/LVS/8. LVS原理详解及部署之一：ARP原理准备/index.html">
<meta property="og:site_name" content="失落的乐章">
<meta property="og:description" content="一、ARP技术概念介绍&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;为什么讲ARP技术，因为平常工作中有接触。还有就是LVS的dr模式是用到arp的技术和数据。 1、什么是ARP协议&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;ARP协议全程地址解析协议（AddressResolution Prot">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="https://github.com/hcldirgit/image/blob/master/LVS%E5%8E%9F%E7%90%86%E8%AF%A6%E8%A7%A3%E5%8F%8A%E9%83%A8%E7%BD%B2%E4%B9%8B%E4%B8%80%EF%BC%9AARP%E5%8E%9F%E7%90%86%E5%87%86%E5%A4%87/01.jpeg?raw=true">
<meta property="og:image" content="https://github.com/hcldirgit/image/blob/master/LVS%E5%8E%9F%E7%90%86%E8%AF%A6%E8%A7%A3%E5%8F%8A%E9%83%A8%E7%BD%B2%E4%B9%8B%E4%B8%80%EF%BC%9AARP%E5%8E%9F%E7%90%86%E5%87%86%E5%A4%87/02.jpeg?raw=true">
<meta property="og:updated_time" content="2017-09-01T08:52:11.162Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="LVS原理详解及部署之一：ARP原理准备">
<meta name="twitter:description" content="一、ARP技术概念介绍&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;为什么讲ARP技术，因为平常工作中有接触。还有就是LVS的dr模式是用到arp的技术和数据。 1、什么是ARP协议&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;ARP协议全程地址解析协议（AddressResolution Prot">
<meta name="twitter:image" content="https://github.com/hcldirgit/image/blob/master/LVS%E5%8E%9F%E7%90%86%E8%AF%A6%E8%A7%A3%E5%8F%8A%E9%83%A8%E7%BD%B2%E4%B9%8B%E4%B8%80%EF%BC%9AARP%E5%8E%9F%E7%90%86%E5%87%86%E5%A4%87/01.jpeg?raw=true">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Muse',
    sidebar: {"position":"left","display":"post","offset":12,"offset_float":0,"b2t":false,"scrollpercent":false},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://hcldirgit.github.io/2017/09/03/LVS/8. LVS原理详解及部署之一：ARP原理准备/"/>





  <title>LVS原理详解及部署之一：ARP原理准备 | 失落的乐章</title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  




<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
  ga('create', '85*****1', 'auto');
  ga('send', 'pageview');
</script>


  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?87980c**************99ec5e26fb5";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>











  
  
    
  

  <div class="container sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">失落的乐章</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">技术面前，永远都是学生。</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-message">
          <a href="/message" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-external-link"></i> <br />
            
            留言
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <link itemprop="mainEntityOfPage" href="https://hcldirgit.github.io/2017/09/03/LVS/8. LVS原理详解及部署之一：ARP原理准备/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="失落的乐章">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/0.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="失落的乐章">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">LVS原理详解及部署之一：ARP原理准备</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-09-03T02:04:46+08:00">
                2017-09-03
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    <div class="post-body" itemprop="articleBody">

      
      

      
        <h2 id="一、ARP技术概念介绍"><a href="#一、ARP技术概念介绍" class="headerlink" title="一、ARP技术概念介绍"></a>一、ARP技术概念介绍</h2><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;为什么讲ARP技术，因为平常工作中有接触。还有就是LVS的dr模式是用到arp的技术和数据。</p>
<h3 id="1、什么是ARP协议"><a href="#1、什么是ARP协议" class="headerlink" title="1、什么是ARP协议"></a>1、什么是ARP协议</h3><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ARP协议全程地址解析协议（AddressResolution Protocol，ARP）是在仅知道主机的IP地址时确定其物理地址的一种协议。因IPv4和以太网的广泛应用，其主要作用是通过已知IP地址，获取对应物理地址的一种协议。</p>
<h3 id="2、什么是ARP代理（ARP-proxy）"><a href="#2、什么是ARP代理（ARP-proxy）" class="headerlink" title="2、什么是ARP代理（ARP proxy）"></a>2、什么是ARP代理（ARP proxy）</h3><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;在网络中代理是非常常见的，所谓的代理就是我朝一个人要，另外一个人给。生活中一个比较实际的例子就是，房屋中介。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Arp协议要求通信的主机的双方必须是在物理的同一个网段。那如果发送主机和目标主机不是在同一个局域网里，而ARP广播包是不能够跨越网段进行传输的。所以此时就需要一个路由或ARP中继技术来转发ARP请求包。客户端获取到的MAC地址是路由器或者中继的MAC地址。那么之后这个客户端发给目的端的数据，都会先发给这个路由器或ARP中继，再进而转给目的端，这种情况就称为ARP代理。</p>
<h3 id="3、arp协议工作原理"><a href="#3、arp协议工作原理" class="headerlink" title="3、arp协议工作原理"></a>3、arp协议工作原理</h3><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;原理图：</p>
<p><img src="https://github.com/hcldirgit/image/blob/master/LVS%E5%8E%9F%E7%90%86%E8%AF%A6%E8%A7%A3%E5%8F%8A%E9%83%A8%E7%BD%B2%E4%B9%8B%E4%B8%80%EF%BC%9AARP%E5%8E%9F%E7%90%86%E5%87%86%E5%A4%87/01.jpeg?raw=true" alt=""></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;当主机10.0.0.1要发送数据给10.0.0.2数据，会首先去查本地的arp缓存表，如果有此IP地址和此主机对应的MAC地址，如果有就可以直接传输数据。如果没有就主机10.0.0.1就会向局域网去广播，询问谁的IP地址是10.0.0.2.此时在本局域网中的所有主机都能够收到此广播包，但只有主机10.0.0.2才会回应这个广播包。会以单播的形式直接回复10.0.0.2说我的MAC地址为多少。此时10.0.0.1收到了此信息，那么两者之间就能够通过MAC地址进行通信了。并且将这个ARP和IP对应信息缓存到ARP缓存表里。</p>
<h4 id="ARP欺骗工作原理："><a href="#ARP欺骗工作原理：" class="headerlink" title="ARP欺骗工作原理："></a>ARP欺骗工作原理：</h4><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ARP欺骗就是通过伪造IP地址和MAC地址对实现ARP欺骗的，它能够在网络中产生大量的ARP包，来让网络堵塞。攻击主机只要持续的发送假的ARP包，让网络中的主机缓存错误的IP-MAC对应信心，造成网络中断或中间人攻击。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ARP攻击主要是在局域网中的，因为ARP包是不会垮网络传播的。所以划分VLAN能够减少当受到ARP攻击后，网络受影响的范围。</p>
<h4 id="ARP欺骗过程图及讲解："><a href="#ARP欺骗过程图及讲解：" class="headerlink" title="ARP欺骗过程图及讲解："></a>ARP欺骗过程图及讲解：</h4><p><img src="https://github.com/hcldirgit/image/blob/master/LVS%E5%8E%9F%E7%90%86%E8%AF%A6%E8%A7%A3%E5%8F%8A%E9%83%A8%E7%BD%B2%E4%B9%8B%E4%B8%80%EF%BC%9AARP%E5%8E%9F%E7%90%86%E5%87%86%E5%A4%87/02.jpeg?raw=true" alt=""></p>
<h4 id="ARP欺骗防御办法"><a href="#ARP欺骗防御办法" class="headerlink" title="ARP欺骗防御办法"></a>ARP欺骗防御办法</h4><ul>
<li>进行MAC和IP地址进行绑定</li>
<li>杀毒软件开启arp防火墙</li>
</ul>
<h4 id="ARP病毒排查"><a href="#ARP病毒排查" class="headerlink" title="ARP病毒排查"></a>ARP病毒排查</h4><ul>
<li>使用arp –a命令查看本地arp缓存表，查看重复MAC地址或在交换机路由器上查看重复MAC地址。</li>
<li>使用ARP防御软件或检测软件（如：科莱，彩影arp防火墙分析流量，查找可以攻击源）</li>
<li>使用折半法排除网络出错范围。（如先断开一般的网络查看是否正常，如果正常就说明断开的那部分有问题。然后再接上剩下的那一半继续查看，依次类推最终找到问题点）<br>当然排查、预防ARP攻击的方法有很多，大家可以自己寻找。</li>
</ul>
<h2 id="小结"><a href="#小结" class="headerlink" title="小结"></a>小结</h2><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ARP协议的功能就是能够通过IP地址解析到MAC地址。而ARP欺骗的手段就是通过伪造IP-MAC信息，让网络上的主机受骗。误以为攻击主机就是他们要发送的目标主机（路由器）这样就将信息都发给了攻击者，攻击者就能获取网络其他主机的数据包。而且网络上的主机会出现网络中断等现象。如果攻击者在网络上大量的发送ARP信息，也会造成网络的堵塞。</p>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/LVS/" rel="tag"># LVS</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2017/09/03/LVS/6. keepalived 工作原理和配置说明/" rel="next" title="keepalived 工作原理和配置说明">
                <i class="fa fa-chevron-left"></i> keepalived 工作原理和配置说明
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2017/09/03/LVS/9. LVS原理详解及部署之二：LVS原理详解（3种工作方式8种调度算法）/" rel="prev" title="LVS原理详解及部署之二：LVS原理详解（3种工作方式8种调度算法）">
                LVS原理详解及部署之二：LVS原理详解（3种工作方式8种调度算法） <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/images/0.png"
               alt="失落的乐章" />
          <p class="site-author-name" itemprop="name">失落的乐章</p>
           
              <p class="site-description motion-element" itemprop="description">失落的乐章的Blog</p>
          
        </div>
        <nav class="site-state motion-element">

          
            <div class="site-state-item site-state-posts">
              <a href="/">
                <span class="site-state-item-count">627</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          

          
            
            
            <div class="site-state-item site-state-tags">
              <a href="/tags/index.html">
                <span class="site-state-item-count">38</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/hcldirgit" target="_blank" title="GitHub">
                  
                    <i class="fa fa-fw fa-github"></i>
                  
                  GitHub
                </a>
              </span>
            
          
        </div>

        
        

        
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#一、ARP技术概念介绍"><span class="nav-number">1.</span> <span class="nav-text">一、ARP技术概念介绍</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1、什么是ARP协议"><span class="nav-number">1.1.</span> <span class="nav-text">1、什么是ARP协议</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2、什么是ARP代理（ARP-proxy）"><span class="nav-number">1.2.</span> <span class="nav-text">2、什么是ARP代理（ARP proxy）</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3、arp协议工作原理"><span class="nav-number">1.3.</span> <span class="nav-text">3、arp协议工作原理</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#ARP欺骗工作原理："><span class="nav-number">1.3.1.</span> <span class="nav-text">ARP欺骗工作原理：</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#ARP欺骗过程图及讲解："><span class="nav-number">1.3.2.</span> <span class="nav-text">ARP欺骗过程图及讲解：</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#ARP欺骗防御办法"><span class="nav-number">1.3.3.</span> <span class="nav-text">ARP欺骗防御办法</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#ARP病毒排查"><span class="nav-number">1.3.4.</span> <span class="nav-text">ARP病毒排查</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#小结"><span class="nav-number">2.</span> <span class="nav-text">小结</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2017</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">失落的乐章</span>
</div>


<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Muse
  </a>
</div>


        

        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.1"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.1"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.1"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.1"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.1"></script>



  


  




	





  





  





  






  





  

  

  

  

  

  

</body>
</html>
